const defaultImgUrl = 'https://images.chuanggj.com/chuang.png'

const vImg = {
  bind: (el, binding) => {
    el.setAttribute('src', binding.value)
    el.onerror = () => {
      defaultImgUrl
      el.setAttribute('src', defaultImgUrl)
    }
  }
}

export default {
  vImg: vImg
}